package arbitration.gui;


import javax.swing.*;
import java.awt.*;
/**
 * Main frame
 * @author Startsev S.S.
 * @version 1.0
 * @see JFrame
 */
public class MainFrame extends JFrame{
    /**
     * default width
     */
    private static final int DEFWIDTH = 1000;
    /**
     * default height
     */
    private static final int DEFHEIGHT = 700;
    /**
     * default constructor
     */
    MainFrame(){
        try {
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (Exception e) {
            System.out.println(e);
        }
        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension d = tk.getScreenSize();
        setLocation((d.width - DEFWIDTH) / 2, (d.height - DEFHEIGHT) / 2);
        setSize(DEFWIDTH, DEFHEIGHT);
        setIconImage(tk.getImage("calculator.png"));
        setTitle("Расчет штрафных санкций - Арбитражная комиссия");
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());        
        StatusPanel status = new StatusPanel();
        contentPane.add(status, BorderLayout.SOUTH);
        MainPanel panel = new MainPanel(this,status);
        contentPane.add(panel, BorderLayout.CENTER);        
    }

}
